import {legacy_createStore,applyMiddleware} from "redux"
import logger from "redux-logger";
import thunk from "redux-thunk"
import {STROETYPES} from "../types/store.d"
const initialState = {
    data:[]
}

const reducer=(state:STROETYPES = initialState, { type, payload }:any) => {
    switch (type) {

    case "type":
        return { ...state, ...payload }

    default:
        return state
    }
}

const store=legacy_createStore(reducer,applyMiddleware(logger,thunk))
export default store